package com.flxz.forum.domain;

import java.util.List;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.flxz.common.annotation.Excel;
import com.flxz.common.core.domain.BaseEntity;

/**
 * 讨论主题对象 forum_topic
 * 
 * @author fl
 * @date 2025-09-14
 */
public class ForumTopic extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主题ID */
    private Long topicId;

    /** 分类ID */
    @Excel(name = "分类ID")
    private Long categoryId;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 主题标题 */
    @Excel(name = "主题标题")
    private String topicTitle;

    /** 主题内容 */
    @Excel(name = "主题内容")
    private String topicContent;

    /** 主题类型（0普通 1精华 2置顶） */
    @Excel(name = "主题类型", readConverterExp = "0=普通,1=精华,2=置顶")
    private String topicType;

    /** 浏览次数 */
    @Excel(name = "浏览次数")
    private Integer viewCount;

    /** 回复次数 */
    @Excel(name = "回复次数")
    private Integer replyCount;

    /** 点赞次数 */
    @Excel(name = "点赞次数")
    private Integer likeCount;

    /** 最后回复时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最后回复时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastReplyTime;

    /** 最后回复用户ID */
    @Excel(name = "最后回复用户ID")
    private Long lastReplyUserId;

    /** 状态（0正常 1关闭 2删除） */
    @Excel(name = "状态", readConverterExp = "0=正常,1=关闭,2=删除")
    private String status;

    /** 是否匿名（0否 1是） */
    @Excel(name = "是否匿名", readConverterExp = "0=否,1=是")
    private String isAnonymous;

    /** 讨论回复信息 */
    private List<ForumReply> forumReplyList;

    public void setTopicId(Long topicId) 
    {
        this.topicId = topicId;
    }

    public Long getTopicId() 
    {
        return topicId;
    }

    public void setCategoryId(Long categoryId) 
    {
        this.categoryId = categoryId;
    }

    public Long getCategoryId() 
    {
        return categoryId;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setTopicTitle(String topicTitle) 
    {
        this.topicTitle = topicTitle;
    }

    public String getTopicTitle() 
    {
        return topicTitle;
    }

    public void setTopicContent(String topicContent) 
    {
        this.topicContent = topicContent;
    }

    public String getTopicContent() 
    {
        return topicContent;
    }

    public void setTopicType(String topicType) 
    {
        this.topicType = topicType;
    }

    public String getTopicType() 
    {
        return topicType;
    }

    public void setViewCount(Integer viewCount) 
    {
        this.viewCount = viewCount;
    }

    public Integer getViewCount() 
    {
        return viewCount;
    }

    public void setReplyCount(Integer replyCount) 
    {
        this.replyCount = replyCount;
    }

    public Integer getReplyCount() 
    {
        return replyCount;
    }

    public void setLikeCount(Integer likeCount) 
    {
        this.likeCount = likeCount;
    }

    public Integer getLikeCount() 
    {
        return likeCount;
    }

    public void setLastReplyTime(Date lastReplyTime) 
    {
        this.lastReplyTime = lastReplyTime;
    }

    public Date getLastReplyTime() 
    {
        return lastReplyTime;
    }

    public void setLastReplyUserId(Long lastReplyUserId) 
    {
        this.lastReplyUserId = lastReplyUserId;
    }

    public Long getLastReplyUserId() 
    {
        return lastReplyUserId;
    }

    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }

    public void setIsAnonymous(String isAnonymous) 
    {
        this.isAnonymous = isAnonymous;
    }

    public String getIsAnonymous() 
    {
        return isAnonymous;
    }

    public List<ForumReply> getForumReplyList()
    {
        return forumReplyList;
    }

    public void setForumReplyList(List<ForumReply> forumReplyList)
    {
        this.forumReplyList = forumReplyList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("topicId", getTopicId())
            .append("categoryId", getCategoryId())
            .append("userId", getUserId())
            .append("topicTitle", getTopicTitle())
            .append("topicContent", getTopicContent())
            .append("topicType", getTopicType())
            .append("viewCount", getViewCount())
            .append("replyCount", getReplyCount())
            .append("likeCount", getLikeCount())
            .append("lastReplyTime", getLastReplyTime())
            .append("lastReplyUserId", getLastReplyUserId())
            .append("status", getStatus())
            .append("isAnonymous", getIsAnonymous())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .append("forumReplyList", getForumReplyList())
            .toString();
    }
}
